package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.vo.WxCatalogIndexVO;
import com.cskaoyan.service.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author heyyon
 */
@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {
    @Autowired
    WxCatalogService wxCatalogService;
    @RequestMapping("index")
    public BaseRespVo index() {
        WxCatalogIndexVO wxCatalogIndexVO = wxCatalogService.index();
        return BaseRespVo.ok(wxCatalogIndexVO);
    }
    @RequestMapping("current")
    public BaseRespVo current(Integer id) {
        WxCatalogIndexVO wxCatalogIndexVO = wxCatalogService.current(id);
        return BaseRespVo.ok(wxCatalogIndexVO);
    }
    
}
